package org.huanletao.ssm.util;

import org.apache.shiro.SecurityUtils;
import org.huanletao.ssm.model.User;

/**
 * <p>
 * </p>
 * package: org.huanletao.ssm.util
 * description:
 * className: ShiroUtils
 * author:  踏雪无痕
 * copyright: Copyright (c) 2022/9/4 16:02
 * since: 1.0.0
 */
public class ShiroUtils {

    /**
     * 获取当前用户信息；
     * @return
     */
    public static User getCurrentUser(){
        return (User) SecurityUtils.getSubject().getPrincipal();
    }


}
